package com.example.miaosha.service;

import com.example.miaosha.error.BusinessException;
import com.example.miaosha.service.model.UserModel;

/**
 * @CreateTime : 2020/09/22 16
 * @Author : lerry_li
 */
public interface UserService {
    //通过用户id获取用户对象的方法
    UserModel getUserById(Integer id);

    //通过缓存获取用户对象
    UserModel getUserByIdInCache(Integer id);

    void register(UserModel userModel) throws BusinessException;

    /*
    phone:用户注册手机号
    encryptPassword:加密后的密码
     */
    UserModel validateLogin(String phone,String encryptPassword) throws BusinessException;
}
